package com.asset.salesforce.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.asset.salesforce.dao.ActionTypeDaoImpl;
import com.asset.salesforce.domain.ActionType;

@Service
@Transactional(readOnly=true)
public class ActionTypeService {

	@Autowired
	private ActionTypeDaoImpl actionTypeDaoImpl;
	
	@Transactional(readOnly = false)
	public void addActionType(ActionType actionType){
		actionTypeDaoImpl.add(actionType);
	}
	@Transactional(readOnly = true)
	public ActionType getActionTypeById(ActionType actionType,Integer id){
		return actionTypeDaoImpl.getById(id,actionType);
	}
	@Transactional(readOnly = true)
	public List<ActionType> getActionTypes(ActionType actionType){
		return actionTypeDaoImpl.getAll(actionType);
	}
	
}
